﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using System.Data;
using AdminModel;

namespace WineService
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“IService1”。
    [ServiceContract]
    interface IService1
    {
        #region 通过sql语句操作数据库
        [OperationContract]
        string GetTable(string sql);
        [OperationContract]
        int ExcNonquery(string sql);
        [OperationContract]
        #endregion

        #region 管理员表
        /// <summary>
        /// 显示管理员表
        /// </summary>
        /// <returns></returns>
        string GetAdmins1();
        [OperationContract]
        /// <summary>
        /// 管理员登陆验证
        /// </summary>
        /// <param name="AdminName"></param>
        /// <param name="AdminPwd"></param>
        /// <returns></returns>
        string GetAdmins2(string AdminName, string AdminPwd);
        [OperationContract]
        /// <summary>
        /// 修改管理员信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int UpdateAdmins2(Admins admin);
        [OperationContract]
        /// <summary>
        /// 添加管理员信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int AddAdmins1(Admins admin);
        [OperationContract]
        /// <summary>
        /// 删除管理员信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int DeleteAdmins(int id);
        [OperationContract]

        #endregion

        #region 管理员角色权限
        /// <summary>
        /// 显示管理员角色权限
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string GetAdminsPower();
        [OperationContract]
        /// <summary>
        /// 搜索管理员角色权限
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string SelectAdminsPower(string name);
        [OperationContract]

        /// <summary>
        /// 根据编号获取管理员角色权限ID
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string GetidAdminsPower(int id);
        [OperationContract]
        /// <summary>
        /// 修改管理员角色权限
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int UpdateAdminsPower(AdminsPower admin);
        [OperationContract]
        /// <summary>
        /// 添加管理员角色权限
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int AddAdminsPower(AdminsPower admin);
        [OperationContract]
        /// <summary>
        /// 删除管理员角色权限
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int DeleteAdminsPower(int id);
        [OperationContract]
        #endregion

        #region 管理员角色表
        /// <summary>
        /// 管理员角色表显示
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string GetAdminRole();
        [OperationContract]
        /// <summary>
        /// 删除管理员角色
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int DeleteAdminRole(int id);
        [OperationContract]
        /// <summary>
        /// 添加管理员角色
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int AddAdminRole(AdminsRole admin);
        [OperationContract]
        /// <summary>
        /// 搜索管理员角色
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string SelectAdminRole(string name);
        [OperationContract]
        /// <summary>
        /// 根据编号获取管理员角色
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
       string GetidAdminRole(string str);
        [OperationContract]
        /// <summary>
        /// 修改管理员角色信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int UpdateAdminRole(AdminsRole admin);
        [OperationContract]
        #endregion

        #region 地区信息
        /// <summary>
        /// 地区信息显示
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string GetArea();
        [OperationContract]
        /// <summary>
        /// 修改地区信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int UpdateArea(Area aa);
        [OperationContract]
        /// <summary>
        ///添加地区信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int AddArea(Area aa);
        [OperationContract]
        /// <summary>
        /// 删除地区信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int DeleteArea(int id);
        [OperationContract]
        #endregion

        #region 收藏表
        /// <summary>
        /// 显示收藏表信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string GetCikkect();
        [OperationContract]
        /// <summary>
        /// 搜索收藏表信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
       string SelectCikkect(string str);
        [OperationContract]
        /// <summary>
        /// 根据编号获取收藏表信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
       string GetidCikkect(string str);
        [OperationContract]
        /// <summary>
        /// 修改收藏表信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int UpdateCikkect(Cikkect cc);
        [OperationContract]
        /// <summary>
        /// 添加收藏表信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int AddCikkect(Cikkect cc);
        [OperationContract]
        /// <summary>
        /// 删除收藏表信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int DeleteCikkect(int id);
        [OperationContract]
        #endregion

        #region 评论表
        /// <summary>
        /// 显示评论表
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string GetComment();
        [OperationContract]
        /// <summary>
        /// 搜索评论表
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
       string SelectComment(string str);
        [OperationContract]
        /// <summary>
        /// 根据编号获取评论表ID
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
       string GetidComment(string str);
        [OperationContract]
        /// <summary>
        /// 修改评论表信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int UpdateComment(Comment cc);
        [OperationContract]
        /// <summary>
        /// 添加评论表信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int AddComment(Comment cc);
        [OperationContract]
        /// <summary>
        /// 删除评论表信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int DeleteComment(int id);
        [OperationContract]

        #endregion

        #region 用户收货信息
        /// <summary>
        /// 用户收货信息显示
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string GetConsignee();
        [OperationContract]
        /// <summary>
        /// 搜索用户收货信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
       string SelectConsignee(string str);
        [OperationContract]
        /// <summary>
        /// 根据编号获取用户收货信息ID
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
       string GetidConsignee(string str);
        [OperationContract]
        /// <summary>
        /// 修改用户收货信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int UpdateConsignee(Consignee cc);
        [OperationContract]
        /// <summary>
        /// 添加用户收货信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int AddConsignee(Consignee cc);
        [OperationContract]
        /// <summary>
        /// 删除用户收货信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int DeleteConsignee(int id);
        [OperationContract]
        #endregion

        #region 商品信息表
        /// <summary>
        /// 显示商品信息表
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string GetGoodsMessage();
        [OperationContract]
        /// <summary>
        /// 搜索管理员商品信息表
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
       string SelectGoodsMessage(string str);
        [OperationContract]
        /// <summary>
        /// 根据编号获取商品信息表ID
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
       string GetidGoodsMessage(string str);
        [OperationContract]
        /// <summary>
        /// 修改商品信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int UpdateGoodsMessage(GoodsMessage gg);
        [OperationContract]
        /// <summary>
        /// 添加商品信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int AddGoodsMessage(GoodsMessage gg);
        [OperationContract]
        /// <summary>
        /// 删除商品信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int DeleteGoodsMessage(int id);
        [OperationContract]

        #endregion

        #region 商品类别表
        /// <summary>
        /// 显示商品类别表
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string GetGoodsType();
        [OperationContract]

        /// <summary>
        /// 修改商品类别信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int UpdateGoodsType(GoodsType type);
        [OperationContract]
        /// <summary>
        /// 添加商品类别信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int AddGoodsType(GoodsType type);
        [OperationContract]
        /// <summary>
        /// 删除商品类别信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int DeleteGoodsType(int GoodsTypeID);
        [OperationContract]
        #endregion

        #region 订单从表
        /// <summary>
        /// 显示订单从表信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string GetInd();
        [OperationContract]

        /// <summary>
        /// 修改订单从表信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int UpdateInd(Ind ind);
        [OperationContract]
        /// <summary>
        /// 添加订单从表信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int AddInd(Ind ind);
        [OperationContract]
        /// <summary>
        /// 删除订单从表信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int DeleteInd(int IndID);
        [OperationContract]
        #endregion

        #region 订单信息
        /// <summary>
        /// 显示订单信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string GetIndent();
        [OperationContract]

        /// <summary>
        /// 修改订单信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int UpdateIndent(Indent indent);
        [OperationContract]
        /// <summary>
        /// 添加订单信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int AddIndent(Indent indent);
        [OperationContract]
        /// <summary>
        /// 删除订单信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int DeleteIndent(int IndentID);
        [OperationContract]
        #endregion

        #region 公告表
        /// <summary>
        /// 公告表显示
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string GetNotice();
        [OperationContract]

        /// <summary>
        /// 修改公告表
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int UpdateNotice(Notice notice);
        [OperationContract]
        /// <summary>
        /// 添加公告表
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int AddNotice(Notice notice);
        [OperationContract]
        /// <summary>
        /// 删除公告表
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int DeleteNotice(int NoticeID);
        [OperationContract]
        #endregion

        #region 支付记录表
        /// <summary>
        /// 显示支付记录表
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string GetRecord();
        [OperationContract]

        /// <summary>
        /// 修改支付记录信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int UpdateRecord(Record record);
        [OperationContract]
        /// <summary>
        /// 添加支付记录信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int AddRecord(Record record);
        [OperationContract]
        /// <summary>
        /// 删除支付记录信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int DeleteRecord(int RecordID);
        [OperationContract]
        #endregion

        #region 商品退货信息
        /// <summary>
        /// 商品退货信息显示
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string GetRenturned();
        [OperationContract]

        /// <summary>
        /// 修改商品退货信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int UpdateRenturned(Renturned renturned);
        [OperationContract]
        /// <summary>
        /// 添加商品退货信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int AddRenturned(Renturned renturned);
        [OperationContract]
        /// <summary>
        /// 删除商品退货信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int DeleteRenturned(int ReturnedID);
        [OperationContract]
        #endregion

        #region 管理员角色权限关联表
        /// <summary>
        /// 管理员角色权限关联表显示
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string GetRolePower();
        [OperationContract]
        /// <summary>
        /// 添加管理员角色权限关联
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int AddRolePower(string str);
        [OperationContract]
        /// <summary>
        /// 删除管理员角色权限关联
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int DeleteRolePower(int RolePowerID);
        [OperationContract]
        /// <summary>
        /// 修改管理员角色权限关联
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int UpdateRolePower(RolePower rolepower);
        [OperationContract]
        #endregion

        #region 购物车信息
        /// <summary>
        /// 购物车信息显示
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string GetShop();
        [OperationContract]
        /// <summary>
        /// 修改购物车信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int UpdateShop(Shop shop);
        [OperationContract]
        /// <summary>
        ///添加购物车信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int AddShop(Shop shop);
        [OperationContract]
        /// <summary>
        /// 删除购物车信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int DeleteShop(int ShopID);
        [OperationContract]
        #endregion

        #region 用户信息
        /// <summary>
        /// 用户信息显示
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string GetUsers();
        [OperationContract]
        /// <summary>
        /// 根据编号获取用户信息ID
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string GetidUsers(int UserID);
        [OperationContract]
        /// <summary>
        /// 修改用户信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int UpdateUsers(Users user);
        [OperationContract]
        /// <summary>
        /// 添加用户信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int AddUsers(Users user);
        [OperationContract]
        /// <summary>
        /// 删除用户信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int DelectUsers(int UserID);
        [OperationContract]
        #endregion

        #region 用户角色信息
        /// <summary>
        /// 用户角色信息显示
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string GetUsersRole();
        [OperationContract]
        /// <summary>
        /// 搜索用户角色信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        string SelectUsersRole(int ID);
        [OperationContract]
        /// <summary>
        /// 修改用户角色信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int UpdateUsersRole(UsersRole role);
        [OperationContract]
        /// <summary>
        /// 添加用户角色信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int AddUsersRole(UsersRole role);
        [OperationContract]
        /// <summary>
        /// 删除用户角色信息
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        int DelectUsersRole(int UsersRoleID);
        #endregion

        // TODO: 在此添加您的服务操作
    }
 

    // 使用下面示例中说明的数据约定将复合类型添加到服务操作。
    [DataContract]
    class CompositeType
    {
        bool boolValue = true;
        string stringValue = "Hello ";

        [DataMember]
        bool BoolValue
        {
            get { return boolValue; }
            set { boolValue = value; }
        }

        [DataMember]
        string StringValue
        {
            get { return stringValue; }
            set { stringValue = value; }
        }
        
    }
}
